package com.itx.gatewayx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itx.gatewayx.domain.NewsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 新闻分类Mapper接口
 *
 * @author itx
 */
@Mapper
public interface NewsCategoryMapper extends BaseMapper<NewsCategory> {
    
    /**
     * 获取所有分类（按排序）
     * 
     * @return 分类列表
     */
    @Select("SELECT * FROM news_category WHERE del_flag = 0 ORDER BY sort_order ASC")
    List<NewsCategory> selectAllOrderBySortOrder();
} 